import request from "./request";

export const getUserInfo = (params) => {
  return request({
    url: "/api/website/queryMenuWebsite",
    method: "get",
    params,
  });
};

/**
 * 登录
 * @param {*} data 
 * @returns 
 */
export const login = (data) => {
  return request({
    url: "/user/login",
    method: "post",
    data,
  });
};

// 添加注册功能
export const register = (data) => {
  return request({
    url: "/user/register",
    method: "post",
    data,
  });
};


/**
 * 概念插入
 * @param {*} data 
 * @returns 
 */
export const conceptInsert = (data) => {
  return request({
    url: "/concept/insert",
    method: "post",
    data,
  });
};

/**
 * 概念更新
 * @param {*} data 
 * @returns 
 */
export const conceptUpdate = (data) => {
  return request({
    url: "/concept/update",
    method: "post",
    data,
  });
};

/**
 * 概念删除
 * @param {*} data 
 * @returns 
 */
export const conceptDelete = (data) => {
  return request({
    url: "/concept/delete",
    method: "post",
    data,
  });
};

/**
 * 获取概念列表
 * @param {*} data 
 * @returns 
 */
export const getConceptDataList = async (data) => {
  return request({
    url: "/concept/list-page",
    method: "post",
    data,
  });
};
/**
 * 获取概念列表
 * @param {*} data 
 * @returns 
 */
export const getAllConceptDataList = async (data) => {
  return request({
    url: "/concept/list-all",
    method: "post",
    data,
  });
};

/**
 * 获取所有概念的名字
 * @param {*} data 
 * @returns 
 */
export const getAllConceptNames = async (data) => {
  return request({
    url: "/concept/names",
    method: "post",
    data,
  });
};